<html>
<head>
<title>Starting, please wait...</title>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

<style>

html {
  background-color: #b8b9f6;
}
body {
  color:black;
  /* top right bottom left*/
  margin: 15px 15px 25px 15px;
  padding: 5px;
  padding: 0 0 15px 0;
  padding: 10px 10px 30px 10px;
  background-color: #dfdfff;
  background:white;
  font-family: sans-serif;
  overflow-y: scroll;
}
ul {
  padding-left: 15px;
}
body {
  border-radius: 15px;
  padding: 5px;
}
a, a:hover, a:visited, a:active {
  color: #0f0fFF;
  text-decoration: none;
  cursor: pointer;
}
p {
  padding-left: 25px;
}
h1, h2, h3 {
  padding-left: 15px;
  padding-right: 15px;
  letter-spacing: 1px;
  text-align: left;
  color: #0f0fff;
}
h1 {
  font-size: 140%;
  border-bottom: 2px solid #c9c9f9;
}
h2 {
  font-size: 125%;
  border-bottom: 1px solid #c9c9f9;
}
h3 {
  font-size: 115%;
  border-bottom: 1px dotted #c9c9f9;
}

.jsclass .randomcontent{ /* CSS to hide random contents in JS enabled browsers*/
display: none;
}

</style>

<script type="text/javascript">

/***********************************************
* Random Content (from DIVs) script- by JavaScript Kit (www.javascriptkit.com)
* This notice must stay intact for usage
* Visit JavaScript Kit at http://www.javascriptkit.com/ for this script and 100s more
***********************************************/

if (document.getElementById)
document.documentElement.className = 'jsclass'; //hide content for DOM capable browsers


var randomcontentdisplay={
	divholders:new Object(),
	masterclass: "randomcontent",

	init:function(){
		if (!document.getElementById)
			return;
		var alldivs=document.getElementsByTagName("p"); // paragraphs should be sufficient
        var randomcontentsearch=new RegExp(this.masterclass, "i") //check for CSS class="randomcontent groupX" (x=integer)
		for (var i=0; i<alldivs.length; i++){
			if (randomcontentsearch.test(alldivs[i].className)){
				if (typeof this.divholders[RegExp.$1]=="undefined") //if array to hold this group of divs doesn't exist yet
					this.divholders[RegExp.$1]=new Array() //create array first
					this.divholders[RegExp.$1].push(alldivs[i]) //add this div to the array
                    alldivs[i].style.display="none" //hide everything in case it's the second time this is called
			}
		}
	this.showone()
	},

	showone:function(){
		for (group in this.divholders){ //loop thru each array within object
			var chosenOne=Math.floor(Math.random()*this.divholders[group].length) //randomly pick one entry from array
			this.divholders[group][chosenOne].style.display="block" //display content corresponding to the chosen entry
		}
	},

	showall:function(){
		for (group in this.divholders){ //loop thru each array within object
			for (var i=0; i<this.divholders[group].length; i++) {
                this.divholders[group][i].style.display="block" //display content corresponding to the chosen entry
            }
		}
	}
}

</script>


</head>
<body>

  <h1>The Sage server is currently starting.  Please wait...</h1>

  <p>A page will be opened automatically.</p>

  <p>In the mean time terminal sessions work normally.</p>

  <p>You may safely close this window at any time, or navigate to somewhere else.</p>

  <p> If the server is already running, feel free to <a href="http://localhost:8080/">access the notebook interface</a> at any time.</p>

  <h3>If you think you have waited long enough...</h2>

  <p>Try <code>View Log</code> under the <code>Server</code> menu (or at the root of the menubar item's menu) which may give you some clues as to why it has not started.</p>
  <p>If the problem persists <a href="mailto:sage-support@googlegroups.com">email for support</a>,  ask a question on the <a href="http://ask.sagemath.org/questions/">question and answer site</a>
  or try one of the other many <a href="http://sagemath.org/help.html">avenues of support</a>.</p>


<div class="jsclass">

  <h2>Did you know?</h2>
  <!--  -->
  <p><a href="javascript:randomcontentdisplay.init();">Show a random tip.</a>
     <a href="javascript:randomcontentdisplay.showall();">Show all.</a></p>
  <!--{{{ Tips -->

  <p class="randomcontent">Typing <code>pdb</code> in a shell session will allow debugging when an exception is
  thrown.</p>

  <p class="randomcontent">The file <code>$HOME/.sage/init.sage</code> is run every time Sage is started.</p>

  <p class="randomcontent">Shift clicking on the blue bar above every cell of a worksheet will open a "word
  processor" allowing you to add commentary to your worksheet.</p>

  <p class="randomcontent">You can configure Sage.app to use any shell you like.  Applescripts are given for
  iTerm, Terminal, and xterm.</p>

  <p class="randomcontent">You can add default arguments for shell sessions in the Preferences.  For example,
    typing <kbd>gap</kbd> in the Session field and <kbd>-b -o 2g</kbd> in the Default Arguments field means that
    GAP sessions will be started with no banner and a limit of 2G of RAM.</p>

  <p class="randomcontent">Holding Command while starting a terminal session from the menu gives you an opportunity
    to add command line arguments or change the command that is actually run.  You can also set a preference to
    always prompt for arguments.</p>

  <p class="randomcontent">Sage.app usually uses the Sage distribution bundled inside of itself, but you can point
    it to any copy of Sage you want.  This is handy for development.  In fact, you can even delete the copy of Sage
    inside of Sage.app.  You can use the menu <code>Development &gt; Reveal in Finder</code> to find it.</p>

  <p class="randomcontent">Sage.app contains a rudimentary browser for interacting with the notebook, but most
    people prefer using the system default browser.  You can also set the environment
    variable <code>SAGE_BROWSER</code> to use a specific browser, but for technical reasons this is slower.</p>

  <p class="randomcontent">Sage.app contains a rudimentary browser for interacting with the notebook, but most
    people prefer using the system default browser.  You can also set <code>sage.misc.viewer.BROWSER</code>
    in <code>~/.sage/init.sage</code> to use a different browser.</p>

  <p class="randomcontent">Sage comes with many open source software systems (GAP, pari/gp, singular, maxima, R,
    etc.), many of which are available for direct use.  This can be by running a terminal session of the desired
    type or by choosing it from one of the dropdown buttons in the notebook.</p>

  <p class="randomcontent">Holding option in the menus will show alternate commands.</p>

  <p class="randomcontent">There are Sage development aids
    for <a href="http://wiki.sagemath.org/sage-mode">Emacs</a>
    and <a href="http://wiki.sagemath.org/Tips">vim</a>.</p>

  <p class="randomcontent">You can set up <a href="http://wiki.sagemath.org/bash-completion">bash completion</a>
    for Sage.</p>

  <p class="randomcontent">Add <a href="http://mvngu.wordpress.com/2009/05/21/add-colour-to-your-sage-session/">color
      to your command line</a> by uncommenting the color scheme you like
      in <code>$HOME/.sage/ipython/ipythonrc</code>.</p>

  <p class="randomcontent">Sage can be integrated with LaTeX
    using <a href="http://www.sagemath.org/doc/tutorial/sagetex.html">SageTeX</a>.</p>

  <p class="randomcontent">If you find that LaTeX doesn't work, try
    adding <code>os.environ["PATH"]+=":/usr/texbin:/usr/local/bin"</code> to <code>$HOME/.sage/init.sage</code></p>

  <p class="randomcontent">You can use Sage
    inside <a href="http://webwork.maa.org/wiki/Sage_in_WeBWorK">WeBWork</a> an online homework system.</p>

  <p class="randomcontent">You can use Sage to create <a href="http://wiki.sagemath.org/interact">interactive
      calculation</a>.</p>

  <p class="randomcontent">Sage can be used
    to <a href="http://www.sagemath.org/doc/reference/sage/groups/perm_gps/cubegroup.html#sage.groups.perm_gps.cubegroup.CubeGroup.solve">solve
    a Rubik's cube.</a></p>

  <p class="randomcontent">You can start an interactive GAP session in the middle of a sage session
    calling <kbd>gap_console()</kbd>.  Similarly
    for <kbd>gp_console</kbd>, <kbd>singular_console</kbd>, <kbd>maxima_console</kbd>, <kbd>r_console</kbd>, and so
    forth.</p>

  <p class="randomcontent">Reading the <a href="http://www.sagemath.org/doc/tutorial/">Sage Tutorial</a> is an
    enjoyable way to spend an evening.</p>

  <p class="randomcontent">The Sage interactive shell is based on <a href="http://ipython.org/">IPython</a> so it
    can be customized in the same way.  In particular see the directory <code>$HOME/.sage/ipython/</code>.</p>

  <p class="randomcontent">You can add your own tips about Sage to
    the <a href="http://wiki.sagemath.org/Tips">wiki</a>.</p>

  <p class="randomcontent">Sometimes the best way to find a bug is to explain it to a rubber duck in enough
    detail for the duck to understand.</p>

  <!--}}}-->
  <!--{{{ Math/programming quotes -->

  <p class="randomcontent">A mathematician is a blind man in a dark room looking for a black cat which isn't there.
    <br>--Charles R. Darwin</p>

  <p class="randomcontent">Mathematics is the art of reducing any problem to linear algebra.
    <br>--William Stein</p>

  <p class="randomcontent">If people do not believe that mathematics is simple, it is only because they do not
    realize how complicated life is.
    <br>--John von Neumann</p>

  <p class="randomcontent">So, although broken, things are broken as expected ;-)
    <br>--Harald Schilly</p>

  <p class="randomcontent">If the code and the comments disagree, then both are probably wrong.</p>

  <p class="randomcontent">Rounding Errors are ok.  Otherwise they'd be called actual errors.
    <br>--Scott Hunt</p>

  <p class="randomcontent">Any fool can write code that a computer can understand.  Good programmers write code
    that humans can understand.
    <br>--Martin Fowler</p>

  <p class="randomcontent">∀∀∃∃</p>

  <p class="randomcontent">In mathematics you don't understand things.  You just get used to them.
    <br>--John von Neumann</p>

  <p class="randomcontent">A mathematician is a machine for turning coffee into theorems.
    <br>--Alfréd Rényi<br>
    <br>
    Of course, by categorical duality, a comathematician is then a machine for turning cotheorems into ffee.
    <br>--Harg</p>

  <p class="randomcontent">Programs must be written for people to read, and only incidentally for machines to
    execute.
    <br>--Abelson & Sussman, SICP, preface to the first edition</p>

  <!--}}}-->

</div>

<script type="text/javascript">
    randomcontentdisplay.init()
</script>

</body>
</html>
